<!DOCTYPE html>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/EmptyPHPWebPage.php to edit this template
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        // put your code here
        $arr2= array(
            "黑旋风"=>"李逵",
            "及时雨"=>"宋江",
            0=>"孙悟空",
            1=>"张三"
        );
        echo $arr2["黑旋风"];
        $arr2["黑旋风"].=" 喜欢打老虎";
        echo "<br/>".$arr2["黑旋风"];
        $arr2["花和尚"]="鲁智深";
        echo "<br/>".$arr2["花和尚"];
        echo "<br/>".$arr2[0];
        echo "<br/>".$arr2[1];
        
        foreach ($arr2 as $key=>$value){
            $value.=" 修改内容";
            $arr2[$key].=" ok";
            echo "<br/>".$key."--> ".$value;
        }
        echo "<hr/>";
          foreach ($arr2 as $key=>$value){
            echo "<br/>".$key."--> ".$value; 
        }
        ksort($arr2);
        echo "<hr/>";
          foreach ($arr2 as $key=>$value){
            echo "<br/>".$key."--> ".$value;
        }
        asort($arr2);
        echo "<hr/>";
          foreach ($arr2 as $key=>$value){
            echo "<br/>".$key."--> ".$value;
          }
        sort($arr2);
        echo "<hr/>";
          foreach ($arr2 as $key=>$value){
            echo "<br/>".$key."--> ".$value;
        }
        ?>
    </body>
</html>
